﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;
using DAL;
using Models;

namespace BLL
{
    public class AdminInfoLogic
    {
        public static IAdminInfo admin = new AdminInfoDAL();

        public static List<AdminInfo> GetAllAdminInfo()
        {
            List<AdminInfo> list = admin.GetAllAdminInfo();
            return list;
        }
        public static int GetOneAdminInfo(AdminInfo admininfo)
        {
            int isSucess = admin.GetOneAdminInfo(admininfo);
            return isSucess;
        }
        public static int InsertOneAdminInfo(AdminInfo admininfo)
        {
            int isSucess = admin.InsertOneAdminInfo(admininfo);
            return isSucess;
        }
        public static int UpdateOneAdminInfo(AdminInfo admininfo)
        {
            int isSucess = admin.UpdateOneAdminInfo(admininfo);
            return isSucess;
        }
        public static int DeleteOneAdminInfo(int AdminID)
        {
            int isSucess = admin.DeleteOneAdminInfo(AdminID);
            return isSucess;
        }
        public static int GetCountFromUserName(string username)
        {
            return admin.GetCountFromUserName(username);
        }
        public static AdminInfo GetOneFromUid(int uid)
        {
            return admin.GetOneFromUid(uid);
        }
        public static int LogoutAdmin(string userName)
        {
            return admin.LogOutAdminInfo(userName);
        }
    }
}
